/*
 * Metaverse Core
 * Copyright (C) 2010 Vyacheslav Vorobyov, All rights reserved.
 * See LICENSE for full license information.
 */
package org.metaverse.warehouse.com;

import org.openrdf.model.Value;

/**
 * @author vjache
 *
 */
public abstract class Predicate extends ValueConstraint {

	private final Value _value;

	/**
	 * @param aCode
	 * @param aVal
	 */
	protected Predicate(Code aCode, Value aVal) {
		super(aCode);
		_value = aVal;
	}

	/**
	 * @return the value
	 */
	public final Value getValue() {
		return _value;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append('(');
		sb.append(getCode());
		sb.append(':');
		sb.append(_value);
		sb.append(')');
		return sb.toString();
	}
}
